-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to assign an interface or match settings to a connection #723
Conversation
baa4bfb
to
e4f7d5c
Compare
2e8e962
to
3de5288
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it looks good. Just a few suggestions.
|
||
match_config_dbus.insert("interface-name", interfaces); | ||
|
||
match_config_dbus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do:
HashMap::from([
("driver", drivers),
("kernel-command-line", kernels),
("path", paths),
("interface-name", interfaces),
])
It looks more readable to me and it is easy to find out what is included in the HashMap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, originally did so, then added some logic to inserting only the key if it was not empty but as we are inserting it always now it makes sense to do so. Thanks
4b60739
to
ed83dad
Compare
Co-authored-by: Imobach González Sosa <[email protected]>
ed83dad
to
c3f1bd9
Compare
Problem
Agama allows to add/update network connections. However, it relies on NetworkManager to decide which interface to use. Alternatively, Agama should allow the user to assign a connection to an specific interface.
Instead of using just an interface name, Agama should offer some matching capabilities, just like NetworkManager. How the API should look like is up to who implements the feature but the interface-name, the path and the driver should be supported.
Solution
It has been added support to specify to which interfaces the connection should be bond to supporting it directly through the interface name attribute or through a set of match settings as them are supported by NetworkManager.
Testing